package Servlet;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import Service.Servlet;
import vo.Kc;


@WebServlet("/addkc")
public class AddkcServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
	private Servlet a = new Servlet();
	
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		request.setCharacterEncoding("UTF-8");
		String course = request.getParameter("course");
		String hour = request.getParameter("hour");
		Kc re = new Kc(course, hour);
		a.addkc(re);
		response.sendRedirect("course");
	}

	
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		
		doGet(request, response);
	}

}
